
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>CIS-MSP</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/admin.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/public.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/way/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/tubiao/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/extension/way/iconfont.css">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <table  class="layui-table" id="alert" lay-filter="alerts"></table>
        </div>
    </div>
</div>
<script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.js"></script>
<script src="<%=request.getContextPath()%>/huazhi/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>

<script>
    layui.config({
        base: '<%=request.getContextPath()%>/jsp/huazhi/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','table','form','layer','alert'], function () {
        var $ = layui.$
            , table = layui.table
            , form = layui.form
            , layer = layui.layer
            ,laypage=layui.laypage;

        window.setInterval(function () {
            $.ajax({
                type: "post",
                url: "<%=request.getContextPath()%>/rest/smoke/getAlertCount",
                dataType: "json",
                async: false,
                success: function (data) {
                    if(data==true) {
                        table.reload('alert')
                    }
                }
            })

        }, 6000);



    });
</script>
</body>
</html>